<template>
	<div class="flex-alignCenter flex-column">
		<img class="icon" v-if="type == 'success'" src="@/assets/images/paySuccess.png" alt="">
		<img class="icon" v-else src="@/assets/images/payLose.png" alt="">
		<div class="text1"> {{type == 'success'?'支付成功':'支付失败'}}</div>
		<van-button class="button3" @click="goDetail">查看订单</van-button>
		<van-button class="button3" @click="$router.replace('/home')">返回首页</van-button>

	</div>
</template>
<script>
export default {
	name: 'App',
	data() {
		return {
			type: 'success', //success lose
		};
	},
	mounted() {
        this.type = this.$route.query.type
    },
	methods: {
		shareTipHiden() {
			this.$emit('shareTipHiden');
		},
		goDetail() {
			this.$router.push('/order/detail?pkey=' + this.$route.query.pkey);
		},
	},
};
</script>
<style  scoped>
.button3 {
	background: #ffce17;
	border-radius: 50px;
	font-size: 0.3rem;
	font-family: PingFang SC;
	font-weight: bold;
	color: #333;
	padding: 0.22rem 0.3rem;
	height: auto;
    width: 2rem;
    margin-bottom: 0.2rem;
}
.icon {
	width: 1.92rem;
	height: 1.7rem;
      margin-top: 0.8rem ;
}
.text1 {
	font-size: 0.34rem;
	font-family: PingFang SC;
	font-weight: bold;
	color: #333333;
	line-height: 0.24rem;
    margin: 0.36rem 0 0.63rem 0;
}
</style>